docs/parse-support-md: Correctly handle footnotes for non-leaf sections
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 17 Apr 2018 13:34:36 +0000 (14:34 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Apr 2018 12:58:42 +0000 (13:58 +0100)
commitfa9cb90071dbc9a20b01cc6a88d96ba140545af9
tree92a17f4a3e620f473648d167e486483f0b0b5eb9
parent5e77896ddce5dae65a63667e0fd4da1d70cae86f
docs/parse-support-md: Correctly handle footnotes for non-leaf sections

Non-leaf sections with footnotes must have a row of their own, for
just that section, because footnotes only appear if there is status
information.

In that case, the footnote applies to only the rows for that section
in the markdown document, ie that RealSect.

And of course for a leaf section that is true too.

So for footnoes we always want to use a rowspan of the number of
Status elements in the section.  So (i) calculate this in
count_rows_sectlist and (ii) use it, instead of the total number of
rows including all the subsections', when writing out the footnote
ref.

This bug has been present in this script since the beginning.

Also, while we're here, suppress the rowspan if it would be 1.

Reported-by: Lars Kurth <lars.kurth@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
docs/parse-support-md